﻿namespace BLL.Configuration
{
    /// <summary>
    /// Default <see cref="IGlobalSettings"/> implementation that uses web.config as the configuration
    /// source.
    /// </summary>
    public class DefaultGlobalSettings : IGlobalSettings
    {
        #region Fields

        private static readonly DataAccessConfig _dataAccess = new DataAccessConfig();

        private static readonly SecurityConfig _security = new SecurityConfig();

        private static readonly WebConfig _web = new WebConfig();

        private static readonly CdnConfig _cdn = new CdnConfig();

        private static readonly webpagesConfig _webPages = new webpagesConfig();

        private static readonly CompressConfig _compressConfig = new CompressConfig();

        private static readonly PathConfig _pathConfig = new PathConfig();
        #endregion

        public CompressConfig Compress
        {
            get
            {
                return _compressConfig;
            }
        }

        public PathConfig Path
        {
            get { return _pathConfig; }
        }

        public DataAccessConfig Data
        {
            get { return _dataAccess; }
        }

        public webpagesConfig webpages 
        { 
            get
            {
                return _webPages;
            }
        }

        public SecurityConfig Security
        {
            get { return _security; }
        }

        public WebConfig Web
        {
            get { return _web; }
        }

        public CdnConfig CDNConfig
        {
            get
            {
                return _cdn;
            }
        }
    }
}